package lab02.test04;

import java.util.Scanner;
public class Test_Staff {
    public static void main(String[] args) {

        //键盘输入员工信息，工资，工作时长
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入姓名：");
        String name=sc.next();
        System.out.println("请输入号码：");
        String num=sc.next();
        System.out.println("请输入员工基础工资：");
        double baseSalary=sc.nextDouble();
        System.out.println("请输入员工工作时长：");
        int hour=sc.nextInt();

        Staff sd=new Staff(name,num,baseSalary);
        HourSalary sk=new HourSalary(name,num,baseSalary,hour);
        sk.getSalaryIncrease(hour);


        //打印工资表
        System.out.println("-----工资表-----");
        System.out.println("姓名："+sd.getName());
        System.out.println("号码："+sd.getNum());
        System.out.println("基础工资："+sd.getBaseSalary());
        System.out.println("总工资："+(sk.getSalaryIncrease(hour)+sd.getBaseSalary()));


    }
}
